<template>
  <div class="member-section" :style="outModuleCss">
    <div :style="moduleBgCss" class="module-bg"></div>
    <!-- 默认模板 -->
    <defaultTem
      v-if="styleType == 1"
      :propsData="propsData"
      @handleClassifyTabItem="handleClassifyTabItem"
    ></defaultTem>
    <!-- 模板二 -->
    <columnTem
      v-if="styleType == 2"
      :propsData="propsData"
      @handleClassifyTabItem="handleClassifyTabItem"
    ></columnTem>
  </div>
</template>

<script>
import { mixinsModuleCss } from "@/components/DiyNew/diy/mixins/index.js";
import columnTem from "./templates/column.vue";
import defaultTem from "./templates/defaultTem.vue";

export default {
  name: "userMember",
  props: {
    propsData: {
      type: Object,
      default: {},
    },
  },
  mixins: [mixinsModuleCss],
  components: {
    columnTem,
    defaultTem,
  },
  data() {
    return {};
  },
  mounted() {},
  watch: {},
  computed: {
    styleType() {
      return this.propsData.params.styleType || "1";
    },
  },
  methods: {
    // 点击编辑当前状态
    handleClassifyTabItem(e) {
      this.$emit("chooseMoudle", e);
    },
  },
};
</script>

<style lang="scss" scoped>
.member-section {
  width: 100%;
  position: relative;
  .module-bg {
    width: 100%;
    height: 100%;
    z-index: -1;
    position: absolute;
    left: 0;
    top: 0;
  }
}
</style>
